package com.shensi.appCollect.pojo.dto;

import lombok.Getter;
import lombok.Setter;

import javax.validation.Valid;
import javax.validation.constraints.*;
import javax.validation.groups.Default;
import java.util.List;

/**
 * @date 2024/1/2
 */
@Setter
@Getter
public class BroadcastCancelOrderDTO {
    @NotBlank(groups = GetView.class)
    private String gunName;
    private Integer enterpriseId;
    @NotNull
    @Min(1)
    private Integer stationId;
    private String orderNo;
    private String oilPersonId;
    @Valid
    @Size(groups = PostView.class,min = 1)
    @Null(groups = GetView.class)
    private List<Gun> gunList;

    @Getter
    @Setter
    public static class Gun{
        @NotBlank
        private String gunName;
        private String oilPersonId;
    }

    public interface GetView extends Default {}
    public interface PostView extends Default {}

}
